package com.rui.study.algorithm.L_深入理解JVM_语法糖;

/**
 * @program: study
 * @description:
 * @author: Yaowr
 * @create: 2019-03-04 09:14
 **/
public class Demo2 {
    /**
     * 自动装箱的陷阱
     */
    public static void main(String[] args) {
        Integer a = 1;
        Integer b = 2;
        Integer c = 3;
        Integer d = 3;
        Integer e = 321;
        Integer f = 321;
        Long g = 3L;

        System.out.println(c == d);
        System.out.println(e == f);
        System.out.println(c == (a+b));
        System.out.println(c.equals(a+b));
        System.out.println(g == (a+b));
        System.out.println(g.equals(a+b));
    }
}
